home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 3_17.lha / 3_17 / 3_17b.c < prev    next >
C/C++ Source or Header  |  1993-08-08  |  459b  |  40 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / Example 2 of indentation styles
  6. include <stdio.h>
  7. nt main(int, char**)
  8.  
  9.    int a;
  10.    for (a = 0; a < 4; )
  11. {
  12. a++;
  13. }
  14.  
  15.    if (a > 1)
  16. {
  17. printf(">1");
  18. }
  19.  
  20.    else
  21. {
  22. printf("<2");
  23. }
  24.  
  25.    switch (a)
  26. {
  27. case 3:
  28.     printf("3");
  29.     break;
  30.  
  31. default:
  32.     printf("!=3");
  33.     break;
  34. }
  35.  
  36.    do  {
  37. printf("DW");
  38. } while (a++ < 8);
  39.  
  40.